home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 23 code / Internet Config / IC 1.1 / ICProgKit1.1 / Source / ICGluePPC / ICPPCGlue.c < prev   
Encoding:
C/C++ Source or Header  |  1995-04-23  |  16.7 KB  |  744 lines  |  [TEXT/MPCC]

  1. #include <Types.h>
  2. #include <MixedMode.h>
  3. #include <GestaltEqu.h>
  4. #include <Components.h>
  5.  
  6. #include "ICTypes.h"
  7. #include "ICCAPI.h"
  8.  
  9. #pragma options align=mac68k
  10.  
  11. enum {
  12.     uppCallComponentProcInfo = kPascalStackBased
  13.         | RESULT_SIZE(kFourByteCode)
  14.         | STACK_ROUTINE_PARAMETER(1, kFourByteCode)
  15. };
  16.  
  17.  
  18. pascal ICError ICStart(ICInstance *inst, OSType creator)
  19. {
  20.     ICError junk;
  21.     ICError err;
  22.     long response;
  23.     struct {
  24.         char flags;
  25.         char size;
  26.         short what;
  27.         //
  28.         OSType creator;
  29.         //
  30.         ICInstance inst;
  31.     } start_component_params;
  32.     
  33.     *inst = nil;
  34.     if (Gestalt(gestaltComponentMgr, &response) == noErr) {
  35.         *inst = (ICInstance) OpenDefaultComponent(internetConfigurationComponentType, internetConfigurationComponentSubType);
  36.     };
  37.     if (*inst == nil) {
  38.         err = badComponentInstance;
  39.     } else {
  40.         start_component_params.flags = 0;
  41.         start_component_params.size = 4;
  42.         start_component_params.what = 0;
  43.         start_component_params.creator = creator;
  44.         start_component_params.inst = *inst;
  45.         err = CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &start_component_params);
  46.         if (err != noErr) {
  47.             junk = CloseComponent((ComponentInstance) *inst);
  48.             *inst = nil;
  49.         };
  50.     };
  51.     return(err);
  52. }
  53.  
  54. pascal ICError ICStop(ICInstance inst)
  55. {
  56.     ICError err;
  57.     ICError err2;
  58.     struct {
  59.         char flags;
  60.         char size;
  61.         short what;
  62.         //
  63.         //
  64.         ICInstance inst;
  65.     } stop_component_params;
  66.     
  67.     stop_component_params.flags = 0;
  68.     stop_component_params.size = 0;
  69.     stop_component_params.what = 1;
  70.     stop_component_params.inst = inst;
  71.     err = CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &stop_component_params);
  72.     err2 = CloseComponent((ComponentInstance) inst);
  73.     if (err == noErr) {
  74.         err = err2;
  75.     };
  76.     return(err);
  77. }
  78.  
  79. pascal ICError ICFindConfigFile(ICInstance inst, short count, ICDirSpecArrayPtr folders)
  80. {
  81.     struct {
  82.         char flags;
  83.         char size;
  84.         short what;
  85.         //
  86.         ICDirSpecArrayPtr folders;
  87.         short count;
  88.         //
  89.         ICInstance inst;
  90.     } find_config_file_params;
  91.     
  92.     find_config_file_params.flags = 0;
  93.     find_config_file_params.size = 6;
  94.     find_config_file_params.what = 2;
  95.     find_config_file_params.folders = folders;
  96.     find_config_file_params.count = count;
  97.     find_config_file_params.inst = inst;
  98.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &find_config_file_params));
  99. }
  100.  
  101. pascal ICError ICFindUserConfigFile(ICInstance inst, ICDirSpec *where)
  102. {
  103.     struct {
  104.         char flags;
  105.         char size;
  106.         short what;
  107.         //
  108.         ICDirSpec *where;
  109.         //
  110.         ICInstance inst;
  111.     } find_user_config_file_params;
  112.     
  113.     find_user_config_file_params.flags = 0;
  114.     find_user_config_file_params.size = 0x04;
  115.     find_user_config_file_params.what = 0x0E;
  116.     //
  117.     find_user_config_file_params.where = where;
  118.     //
  119.     find_user_config_file_params.inst = inst;
  120.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &find_user_config_file_params));
  121. }
  122.  
  123. pascal ICError ICSpecifyConfigFile(ICInstance inst, FSSpec *config)
  124. {
  125.     struct {
  126.         char flags;
  127.         char size;
  128.         short what;
  129.         //
  130.         FSSpec *config;
  131.         //
  132.         ICInstance inst;
  133.     } specify_config_file_params;
  134.     
  135.     specify_config_file_params.flags = 0;
  136.     specify_config_file_params.size = 4;
  137.     specify_config_file_params.what = 3;
  138.     specify_config_file_params.config = config;
  139.     specify_config_file_params.inst = inst;
  140.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &specify_config_file_params));
  141. }
  142.  
  143. pascal ICError ICGetSeed(ICInstance inst, long *seed)
  144. {
  145.     struct {
  146.         char flags;
  147.         char size;
  148.         short what;
  149.         //
  150.         long *seed;
  151.         //
  152.         ICInstance inst;
  153.     } get_seed_params;
  154.     
  155.     get_seed_params.flags = 0;
  156.     get_seed_params.size = 4;
  157.     get_seed_params.what = 4;
  158.     get_seed_params.seed = seed;
  159.     get_seed_params.inst = inst;
  160.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &get_seed_params));
  161. }
  162.  
  163. pascal ICError ICBegin(ICInstance inst, ICPerm perm)
  164. {
  165.     struct {
  166.         char flags;
  167.         char size;
  168.         short what;
  169.         //
  170.         ICPerm perm;
  171.         //
  172.         ICInstance inst;
  173.     } begin_params;
  174.     
  175.     begin_params.flags = 0;
  176.     begin_params.size = 2;
  177.     begin_params.what = 5;
  178.     begin_params.perm = perm;
  179.     begin_params.inst = inst;
  180.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &begin_params));
  181. }
  182.  
  183. pascal ICError ICGetPref(ICInstance inst, ConstStr255Param key, ICAttr *attr, Ptr buf, long *size)
  184. {
  185.     struct {
  186.         char flags;
  187.         char size;
  188.         short what;
  189.         //
  190.         long *psize;
  191.         Ptr buf;
  192.         ICAttr *attr;
  193.         Str255 *key;
  194.         //
  195.         ICInstance inst;
  196.     } get_pref_params;
  197.     
  198.     get_pref_params.flags = 0;
  199.     get_pref_params.size = 16;
  200.     get_pref_params.what = 6;
  201.     //
  202.     get_pref_params.psize = size;
  203.     get_pref_params.buf = buf;
  204.     get_pref_params.attr = attr;
  205.     get_pref_params.key = (Str255 *) key;
  206.     //
  207.     get_pref_params.inst = inst;
  208.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &get_pref_params));
  209. }
  210.  
  211. pascal ICError ICSetPref(ICInstance inst, ConstStr255Param key, ICAttr attr, Ptr buf, long size)
  212. {
  213.     struct {
  214.         char flags;
  215.         char size;
  216.         short what;
  217.         //
  218.         long psize;
  219.         Ptr buf;
  220.         ICAttr attr;
  221.         Str255 *key;
  222.         //
  223.         ICInstance inst;
  224.     } set_pref_params;
  225.     
  226.     set_pref_params.flags = 0;
  227.     set_pref_params.size = 16;
  228.     set_pref_params.what = 7;
  229.     //
  230.     set_pref_params.psize = size;
  231.     set_pref_params.buf = buf;
  232.     set_pref_params.attr = attr;
  233.     set_pref_params.key = (Str255 *) key;
  234.     //
  235.     set_pref_params.inst = inst;
  236.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &set_pref_params));
  237. }
  238.  
  239. pascal ICError ICGetPrefHandle(ICInstance inst, ConstStr255Param key, ICAttr *attr, Handle *prefh)
  240. {
  241.     struct {
  242.         char flags;
  243.         char size;
  244.         short what;
  245.         //
  246.         Handle *prefh;
  247.         ICAttr *attr;
  248.         Str255 *key;
  249.         //
  250.         ICInstance inst;
  251.     } get_pref_handle_params;
  252.     
  253.     get_pref_handle_params.flags = 0;
  254.     get_pref_handle_params.size = 0x0C;
  255.     get_pref_handle_params.what = 0x1A;
  256.     //
  257.     get_pref_handle_params.prefh = prefh;
  258.     get_pref_handle_params.attr = attr;
  259.     get_pref_handle_params.key = (Str255 *) key;
  260.     //
  261.     get_pref_handle_params.inst = inst;
  262.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &get_pref_handle_params));
  263. }
  264.  
  265. pascal ICError ICSetPrefHandle(ICInstance inst, ConstStr255Param key, ICAttr attr, Handle prefh)
  266. {
  267.     struct {
  268.         char flags;
  269.         char size;
  270.         short what;
  271.         //
  272.         Handle prefh;
  273.         ICAttr attr;
  274.         Str255 *key;
  275.         //
  276.         ICInstance inst;
  277.     } set_pref_handle_params;
  278.     
  279.     set_pref_handle_params.flags = 0;
  280.     set_pref_handle_params.size = 0x0C;
  281.     set_pref_handle_params.what = 0x1A;
  282.     //
  283.     set_pref_handle_params.prefh = prefh;
  284.     set_pref_handle_params.attr = attr;
  285.     set_pref_handle_params.key = (Str255 *) key;
  286.     //
  287.     set_pref_handle_params.inst = inst;
  288.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &set_pref_handle_params));
  289. }
  290.  
  291. pascal ICError ICCountPref(ICInstance inst, long *count)
  292. {
  293.     struct {
  294.         char flags;
  295.         char size;
  296.         short what;
  297.         //
  298.         long *count;
  299.         //
  300.         ICInstance inst;
  301.     } count_pref_params;
  302.     
  303.     count_pref_params.flags = 0;
  304.     count_pref_params.size = 4;
  305.     count_pref_params.what = 8;
  306.     count_pref_params.count = count;
  307.     count_pref_params.inst = inst;
  308.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &count_pref_params));
  309. }
  310.  
  311. pascal ICError ICGetIndPref(ICInstance inst, long n, Str255 key)
  312. {
  313.     struct {
  314.         char flags;
  315.         char size;
  316.         short what;
  317.         //
  318.         StringPtr key;
  319.         long n;
  320.         //
  321.         ICInstance inst;
  322.     } get_ind_pref_params;
  323.     
  324.     get_ind_pref_params.flags = 0;
  325.     get_ind_pref_params.size = 8;
  326.     get_ind_pref_params.what = 9;
  327.     //
  328.     get_ind_pref_params.key = (StringPtr) key;
  329.     get_ind_pref_params.n = n;
  330.     //
  331.     get_ind_pref_params.inst = inst;
  332.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &get_ind_pref_params));
  333. }
  334.  
  335. pascal ICError ICDeletePref(ICInstance inst, ConstStr255Param key)
  336. {
  337.     struct {
  338.         char flags;
  339.         char size;
  340.         short what;
  341.         //
  342.         Str255 *key;
  343.         //
  344.         ICInstance inst;
  345.     } delete_pref_params;
  346.     
  347.     delete_pref_params.flags = 0;
  348.     delete_pref_params.size = 4;
  349.     delete_pref_params.what = 12;
  350.     //
  351.     delete_pref_params.key = (Str255 *) key;
  352.     //
  353.     delete_pref_params.inst = inst;
  354.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &delete_pref_params));
  355. }
  356.  
  357. pascal ICError ICEnd(ICInstance inst)
  358. {
  359.     struct {
  360.         char flags;
  361.         char size;
  362.         short what;
  363.         //
  364.         //
  365.         ICInstance inst;
  366.     } end_params;
  367.     
  368.     end_params.flags = 0;
  369.     end_params.size = 0;
  370.     end_params.what = 10;
  371.     //
  372.     end_params.inst = inst;
  373.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &end_params));
  374. }
  375.  
  376. pascal ICError ICDefaultFileName(ICInstance inst, Str63 name)
  377. {
  378.     struct {
  379.         char flags;
  380.         char size;
  381.         short what;
  382.         //
  383.         StringPtr name;
  384.         //
  385.         ICInstance inst;
  386.     } default_file_name_params;
  387.     
  388.     default_file_name_params.flags = 0;
  389.     default_file_name_params.size = 4;
  390.     default_file_name_params.what = 11;
  391.     default_file_name_params.name = (StringPtr) name;
  392.     default_file_name_params.inst = inst;
  393.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &default_file_name_params));
  394. }
  395.  
  396. pascal ICError ICGetComponentInstance(ICInstance inst, Ptr *component_inst)
  397. {
  398.     *component_inst = inst;
  399. }
  400.  
  401. pascal ICError ICEditPreferences(ICInstance inst, ConstStr255Param key)
  402. {
  403.     struct {
  404.         char flags;
  405.         char size;
  406.         short what;
  407.         //
  408.         Str255 *key;
  409.         //
  410.         ICInstance inst;
  411.     } edit_preferences_params;
  412.     
  413.     edit_preferences_params.flags = 0;
  414.     edit_preferences_params.size = 0x04;
  415.     edit_preferences_params.what = 0x0F;
  416.     //
  417.     edit_preferences_params.key = (Str255 *) key;
  418.     //
  419.     edit_preferences_params.inst = inst;
  420.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &edit_preferences_params));
  421. }
  422.  
  423. pascal ICError ICParseURL(ICInstance inst, ConstStr255Param hint, Ptr data, long len, long *selStart, long *selEnd, Handle url)
  424. {
  425.     struct {
  426.         char flags;
  427.         char size;
  428.         short what;
  429.         //
  430.         Handle url;
  431.         long *selEnd;
  432.         long *selStart;
  433.         long len;
  434.         Ptr data;
  435.         Str255 *hint;
  436.         //
  437.         ICInstance inst;
  438.     } parse_url_params;
  439.     
  440.     parse_url_params.flags = 0;
  441.     parse_url_params.size = 0x18;
  442.     parse_url_params.what = 0x10;
  443.     //
  444.     parse_url_params.url = url;
  445.     parse_url_params.selEnd = selEnd;
  446.     parse_url_params.selStart = selStart;
  447.     parse_url_params.len = len;
  448.     parse_url_params.data = data;
  449.     parse_url_params.hint = (Str255 *) hint;
  450.     //
  451.     parse_url_params.inst = inst;
  452.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &parse_url_params));
  453. }
  454.  
  455. pascal ICError ICLaunchURL(ICInstance inst, ConstStr255Param hint, Ptr data, long len, long *selStart, long *selEnd)
  456. {
  457.     struct {
  458.         char flags;
  459.         char size;
  460.         short what;
  461.         //
  462.         long *selEnd;
  463.         long *selStart;
  464.         long len;
  465.         Ptr data;
  466.         Str255 *hint;
  467.         //
  468.         ICInstance inst;
  469.     } launch_url_params;
  470.     
  471.     launch_url_params.flags = 0;
  472.     launch_url_params.size = 0x14;
  473.     launch_url_params.what = 0x11;
  474.     //
  475.     launch_url_params.selEnd = selEnd;
  476.     launch_url_params.selStart = selStart;
  477.     launch_url_params.len = len;
  478.     launch_url_params.data = data;
  479.     launch_url_params.hint = (Str255 *) hint;
  480.     //
  481.     launch_url_params.inst = inst;
  482.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &launch_url_params));
  483. }
  484.  
  485. pascal ICError ICMapFilename(ICInstance inst, ConstStr255Param filename, ICMapEntry *entry)
  486. {
  487.     struct {
  488.         char flags;
  489.         char size;
  490.         short what;
  491.         //
  492.         ICMapEntry *entry;
  493.         Str255 *filename;
  494.         //
  495.         ICInstance inst;
  496.     } map_filename_params;
  497.     
  498.     map_filename_params.flags = 0;
  499.     map_filename_params.size = 0x08;
  500.     map_filename_params.what = 0x18;
  501.     //
  502.     map_filename_params.entry = entry;
  503.     map_filename_params.filename = (Str255 *) filename;
  504.     //
  505.     map_filename_params.inst = inst;
  506.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &map_filename_params));
  507. }
  508.  
  509. pascal ICError ICMapTypeCreator(ICInstance inst, OSType fType, OSType fCreator, ConstStr255Param filename, ICMapEntry *entry)
  510. {
  511.     struct {
  512.         char flags;
  513.         char size;
  514.         short what;
  515.         //
  516.         ICMapEntry *entry;
  517.         Str255 *filename;
  518.         OSType fCreator;
  519.         OSType fType;
  520.         //
  521.         ICInstance inst;
  522.     } map_type_creator_params;
  523.     
  524.     map_type_creator_params.flags = 0;
  525.     map_type_creator_params.size = 0x10;
  526.     map_type_creator_params.what = 0x19;
  527.     //
  528.     map_type_creator_params.entry = entry;
  529.     map_type_creator_params.filename = (Str255 *) filename;
  530.     map_type_creator_params.fCreator = fCreator;
  531.     map_type_creator_params.fType = fType;
  532.     //
  533.     map_type_creator_params.inst = inst;
  534.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &map_type_creator_params));
  535. }
  536.  
  537. pascal ICError ICMapEntriesFilename(ICInstance inst, Handle entries, ConstStr255Param filename, ICMapEntry *entry)
  538. {
  539.     struct {
  540.         char flags;
  541.         char size;
  542.         short what;
  543.         //
  544.         ICMapEntry *entry;
  545.         Str255 *filename;
  546.         Handle entries;
  547.         //
  548.         ICInstance inst;
  549.     } map_entries_filename_params;
  550.     
  551.     map_entries_filename_params.flags = 0;
  552.     map_entries_filename_params.size = 0x0C;
  553.     map_entries_filename_params.what = 0x1C;
  554.     //
  555.     map_entries_filename_params.entry = entry;
  556.     map_entries_filename_params.filename = (Str255 *) filename;
  557.     map_entries_filename_params.entries = entries;
  558.     //
  559.     map_entries_filename_params.inst = inst;
  560.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &map_entries_filename_params));
  561. }
  562.  
  563. pascal ICError ICMapEntriesTypeCreator(ICInstance inst, Handle entries, OSType fType, OSType fCreator, ConstStr255Param filename, ICMapEntry *entry)
  564. {
  565.     struct {
  566.         char flags;
  567.         char size;
  568.         short what;
  569.         //
  570.         ICMapEntry *entry;
  571.         Str255 *filename;
  572.         OSType fCreator;
  573.         OSType fType;
  574.         Handle entries;
  575.         //
  576.         ICInstance inst;
  577.     } map_entries_type_creator_params;
  578.     
  579.     map_entries_type_creator_params.flags = 0;
  580.     map_entries_type_creator_params.size = 0x14;
  581.     map_entries_type_creator_params.what = 0x1D;
  582.     //
  583.     map_entries_type_creator_params.entry = entry;
  584.     map_entries_type_creator_params.filename = (Str255 *) filename;
  585.     map_entries_type_creator_params.fCreator = fCreator;
  586.     map_entries_type_creator_params.fType = fType;
  587.     map_entries_type_creator_params.entry = entry;
  588.     //
  589.     map_entries_type_creator_params.inst = inst;
  590.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &map_entries_type_creator_params));
  591. }
  592.  
  593. pascal ICError ICCountMapEntries(ICInstance inst, Handle entries, long *count)
  594. {
  595.     struct {
  596.         char flags;
  597.         char size;
  598.         short what;
  599.         //
  600.         long *count;
  601.         Handle entries;
  602.         //
  603.         ICInstance inst;
  604.     } count_map_entries_params;
  605.     
  606.     count_map_entries_params.flags = 0;
  607.     count_map_entries_params.size = 0x08;
  608.     count_map_entries_params.what = 0x12;
  609.     //
  610.     count_map_entries_params.count = count;
  611.     count_map_entries_params.entries = entries;
  612.     //
  613.     count_map_entries_params.inst = inst;
  614.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &count_map_entries_params));
  615. }
  616.  
  617. pascal ICError ICGetIndMapEntry(ICInstance inst, Handle entries, long ndx, long *pos, ICMapEntry *entry)
  618. {
  619.     struct {
  620.         char flags;
  621.         char size;
  622.         short what;
  623.         //
  624.         ICMapEntry *entry;
  625.         long *pos;
  626.         long ndx;
  627.         Handle entries;
  628.         //
  629.         ICInstance inst;
  630.     } get_ind_map_entry;
  631.     
  632.     get_ind_map_entry.flags = 0;
  633.     get_ind_map_entry.size = 0x10;
  634.     get_ind_map_entry.what = 0x13;
  635.     //
  636.     get_ind_map_entry.entry = entry;
  637.     get_ind_map_entry.pos = pos;
  638.     get_ind_map_entry.ndx = ndx;
  639.     get_ind_map_entry.entries = entries;
  640.     //
  641.     get_ind_map_entry.inst = inst;
  642.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &get_ind_map_entry));
  643. }
  644.  
  645. pascal ICError ICGetMapEntry(ICInstance inst, Handle entries, long pos, ICMapEntry *entry)
  646. {
  647.     struct {
  648.         char flags;
  649.         char size;
  650.         short what;
  651.         //
  652.         ICMapEntry *entry;
  653.         long pos;
  654.         Handle entries;
  655.         //
  656.         ICInstance inst;
  657.     } get_map_entry;
  658.     
  659.     get_map_entry.flags = 0;
  660.     get_map_entry.size = 0x0C;
  661.     get_map_entry.what = 0x14;
  662.     //
  663.     get_map_entry.entry = entry;
  664.     get_map_entry.pos = pos;
  665.     get_map_entry.entries = entries;
  666.     //
  667.     get_map_entry.inst = inst;
  668.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &get_map_entry));
  669. }
  670.  
  671. pascal ICError ICSetMapEntry(ICInstance inst, Handle entries, long pos, ICMapEntry *entry)
  672. {
  673.     struct {
  674.         char flags;
  675.         char size;
  676.         short what;
  677.         //
  678.         ICMapEntry *entry;
  679.         long pos;
  680.         Handle entries;
  681.         //
  682.         ICInstance inst;
  683.     } set_map_entry;
  684.     
  685.     set_map_entry.flags = 0;
  686.     set_map_entry.size = 0x0C;
  687.     set_map_entry.what = 0x15;
  688.     //
  689.     set_map_entry.entry = entry;
  690.     set_map_entry.pos = pos;
  691.     set_map_entry.entries = entries;
  692.     //
  693.     set_map_entry.inst = inst;
  694.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &set_map_entry));
  695. }
  696.  
  697. pascal ICError ICDeleteMapEntry(ICInstance inst, Handle entries, long pos)
  698. {
  699.     struct {
  700.         char flags;
  701.         char size;
  702.         short what;
  703.         //
  704.         long pos;
  705.         Handle entries;
  706.         //
  707.         ICInstance inst;
  708.     } delete_map_entry;
  709.     
  710.     delete_map_entry.flags = 0;
  711.     delete_map_entry.size = 0x08;
  712.     delete_map_entry.what = 0x16;
  713.     //
  714.     delete_map_entry.pos = pos;
  715.     delete_map_entry.entries = entries;
  716.     //
  717.     delete_map_entry.inst = inst;
  718.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &delete_map_entry));
  719. }
  720.  
  721. pascal ICError ICAddMapEntry(ICInstance inst, Handle entries, ICMapEntry *entry)
  722. {
  723.     struct {
  724.         char flags;
  725.         char size;
  726.         short what;
  727.         //
  728.         ICMapEntry *entry;
  729.         Handle entries;
  730.         //
  731.         ICInstance inst;
  732.     } add_map_entry;
  733.     
  734.     add_map_entry.flags = 0;
  735.     add_map_entry.size = 0x08;
  736.     add_map_entry.what = 0x17;
  737.     //
  738.     add_map_entry.entry = entry;
  739.     add_map_entry.entries = entries;
  740.     //
  741.     add_map_entry.inst = inst;
  742.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &add_map_entry));
  743. }
  744.